#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2018/1/24 17:31
# @Author  : yuxi
# @Site    : 
# @File    : intoLogin.py
# @Software: PyCharm

from macaca import WebDriver
import time
desired_caps = {
        'platformName': 'Android',
        'package': 'cn.com.dhc.danlu',
        'activity': 'cn.com.dhc.danlu.main.activity.InitializeActivity',
        'deviceName': '192.168.123.101:5555',
}
server_url = {
        'hostname': '192.168.50.149',
        'port':3456
}

driver = WebDriver(desired_caps, server_url)
driver.init()
time.sleep(3)
# driver.touch('drag',{0,96,1440,96,3})
driver.touch('drag', {'fromX': 1400, 'fromY': 2600, 'toX': 5, 'toY': 2600, 'duration': 1})
driver.touch('drag', {'fromX': 1400, 'fromY': 2600, 'toX': 5, 'toY': 2600, 'duration': 1})
driver.element('xpath','//android.widget.Button[@text="马上体验"]').click()



